#ifndef FUNC_SECONDDERR_H
#define FUNC_SECONDDERR_H

#include "cdecl.h"

/**
 * The module implements second derrivative studying object. One of it's
 * purposes is to find second derrivative maximum.
 */

/**
 * Calculates second derrivative maximum of given function
 * @param func - pointer to function, that returns complex value by 
 * given double parameter and function context
 * @param func_context - to provide function with parameters
 * @param a,b - search diapason, a<b
 * @param eps - error tolerance 
 * @param result - place to put result to
 * @param nknot - number of knots, used, NULL suppresses output
 * @return 0 - OK,
 *         1 - Out of memory
 *         2 - Integer limit exceeded
 */
int func_secondderr_max(complex (*func)(double , void *), void * func_context, double a, double b, double eps, double * result, uint32_t * nknot);


#endif
